package com.carleasoft.mps.cms.business.article.constants;

import com.fasterxml.jackson.annotation.JsonValue;

/**
 * <p>Description: StatusEnum</p>
 * @since 2021/7/5
 * @author taoyujing
 */
public enum StatusEnum {
    NORMAL(0,"正常"),REMOVE(1,"删除"),BLOCK_UP(2,"停用");

    private Integer id;
    private String name;

    private StatusEnum(Integer id, String name) {
        this.id = id;
        this.name = name;
    }
    private StatusEnum(Integer id) {
        this.id = id;
    }

    private StatusEnum(String name) {
        this.name = name;
    }


    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    @JsonValue
    public Integer getId() {
        return id;
    }
    public void setId(Integer id) {
        this.id = id;
    }
    public static boolean isInclude(String key){
        boolean include = false;
        for (FlowStatus e: FlowStatus.values()){
            if(e.getName().equals(key)){
                include = true;
                break;
            }
        }
        return include;
    }
}
